package com.museum.controller.api.admin;

import com.alibaba.fastjson.JSONObject;
import com.museum.base.BaseResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;

@Api(tags = "Super-菜单管理")
public interface AdminPermissionAPI {
    /**
     * 获取全部菜单
     * @return
     */
    @ApiOperation("获取全部菜单")
    @GetMapping("/getAllMenu")
    BaseResponse<JSONObject> getAllPermission();

    /**
     *禁用菜单
     * @param permissionId
     * @return
     */
    @ApiOperation("禁用菜单")
    @PostMapping("closePermission")
    BaseResponse<JSONObject> closePermission(@RequestParam("permissionId") Integer permissionId);

    /**
     * 打开菜单
     * @param permissionId
     * @return
     */
    @ApiOperation("打开菜单")
    @PostMapping("openPermission")
    BaseResponse<JSONObject> openPermission(@RequestParam("permissionId") Integer permissionId);
}
